home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 863 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.4 KB  |  75 lines

  1. Path: uwm.edu!uwvax!news
  2. From: Tuan Truong <truong>
  3. Newsgroups: comp.lang.c
  4. Subject: [help] Please help me to compile my programs
  5. Date: 9 Jan 1996 19:36:57 GMT
  6. Organization: University of WI, Madison -- Computer Sciences Dept.
  7. Message-ID: <4cug4p$3le@spool.cs.wisc.edu>
  8. NNTP-Posting-Host: sun14.cs.wisc.edu
  9. Mime-Version: 1.0
  10. Content-Type: text/plain
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.1N (X11; I; SunOS 4.1.3 sun4m)
  13. X-URL: file:/u/t/r/truong/c_ques
  14.  
  15. Hello,
  16.  
  17. Can someone teach me how to write a MAKEFILE that will compile my 3 programs
  18. and link them to produce a .EXE
  19.  
  20. If possible, please send me some sample MAKEFILES.
  21.  
  22. by the way, I am using a DOS version of C++ compiler. Everything should be 
  23. done at command line.
  24.  
  25. Thank you very much!!!!!
  26.  
  27. Tuan Truong
  28.  
  29. *******prog1.c******
  30. #include "prog3_h.h"   //prog3_h.h has functions' prototypes for the functions
  31.                          in prog3.c
  32. #include "prog2_h.h"   //prog2_h.h has functions' prototypes for the functions
  33.                          in prog2.c
  34. int main()
  35. {
  36.   foo1();  //from prog2.c
  37.   foo2();  //from prog2.c
  38.   foo3();  //from prog3.c
  39.   return 0;
  40. }
  41.  
  42.  
  43. **********************
  44.  
  45.  
  46.  
  47. *******prog2.c******
  48. #include "prog2_h.h"  // has functions' prototypes
  49.  
  50. int foo1();
  51. {
  52.   return 0;
  53. }
  54. int foo2();
  55. {
  56.   return 0;
  57. }
  58. **********************
  59.  
  60.  
  61. *******prog3.c******
  62. #include "prog3_h.h"  // has functions' prototypes
  63.  
  64. int foo3();
  65. {
  66.   return 0;
  67. }
  68.  
  69. **********************
  70.  
  71.  
  72.  
  73.  
  74.  
  75.